package designPatterns_demo.abstract_factory_pattern.demo1;

public class ShapeFactory extends AbstractFactory {
	// 使用 getShape 方法获取形状类型的对象
	@Override
	Shape getShape(String shapeType) {
		if (null == shapeType || "".equals(shapeType)) {
			return null;
		}
		
		if (shapeType.equalsIgnoreCase("CIRCLE")) {
	         return new Circle();
	     } else if (shapeType.equalsIgnoreCase("RECTANGLE")) {
	         return new Rectangle();
	     } else if (shapeType.equalsIgnoreCase("SQUARE")) {
	         return new Square();
	     }
	     return null;
	}

	@Override
	Color getColor(String colorType) {
		return null;
	}
}
